Skip to content

stigenable: drop redundant packages from KS_STIG_PACKAGES - #47

Open
dcasota wants to merge 1 commit into
vmware:masterfrom
dcasota:upstream/stig-drop-redundant-packages
Open

dcasota wants to merge 1 commit into
vmware:masterfrom
dcasota:upstream/stig-drop-redundant-packages

Conversation

@dcasota

@dcasota dcasota commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Removes three of the eight entries in KS_STIG_PACKAGES, and the same three from examples/ova/packages_stig.json so the OVA list and the installer's own list say the same thing. Each entry is either already satisfied transitively or is dead weight.

Package Why it can go
libselinux-utils Already a dependency of selinux-policy; the stig-hardening role never invokes any of its binaries
ntp Installed but never configured — no task in the role notifies the time-sync handlers, so all three are dead code, and 0 of the 117 PHTN-50-xxxxxx controls cover time sync
libgcrypt A workaround for aide declaring only an unversioned Requires: libgcrypt; that belongs in aide.spec

Keeping the two lists in step matters for its own sake: a package list restated in two places is exactly how the media and the installer drifted apart before.

On ntp specifically

The role's README documents var_ntp_servers, var_syslog_server_name and var_syslog_server_port, but nothing in the role consumes them. Installing ntp therefore satisfies no control — it just adds a package.

Verified on real installs, on both installer versions

Four STIG installs whose manifests already carry the reduced list — two on photon-os-installer 2.8, two on latest — with additional_packages exactly [audit, rsyslog, openssl-fips-provider, selinux-policy, aide]:

2.8 latest
libselinux-utils-3.10-4.ph5 installed (transitively) installed (transitively)
libgcrypt-1.10.4-2.ph5 installed (transitively) installed (transitively)
ntp / ntpsec absent absent

Dropping the three from the explicit list changed nothing about what lands on the system. Time sync works via systemd-timesyncd (System clock synchronized: yes). STIG ansible run: 0 failed tasks; SELinux Enforcing; FIPS canister verification passes.

aide's dependency is now a versioned Requires: libgcrypt >= 1.10.4, confirmed in aide-0.19-3.ph5, so nothing rests on the unversioned form any more.

Lint and tests

isort --check-only --diff . and flake8 . exit 0.

What is not covered

The evidence above comes from the ISO installer path. examples/ova/packages_stig.json is consumed by the OVA image build, which resolves the same tdnf closure but is a separate invocation and has not been rebuilt here. The two lists are asserted equal programmatically, and the transitive dependencies are the same ones proven above, but an OVA build itself has not been run.

Related

The aide side of this is a versioned Requires: libgcrypt >= 1.10.4 guarded by photon_subrelease >= 91, filed separately against the photon repo (vmware/photon#1670).

🤖 Generated with Claude Code

@oliverkurth

Copy link
Copy Markdown
Collaborator

I guess these can then also be removed from examples/ova/packages_stig.json. Can you please try that and test?

Three of the eight entries are removed. Each is either already satisfied
transitively or is dead weight:

  libselinux-utils  already a dependency of selinux-policy, and the
                    stig-hardening role never invokes any of its binaries
  ntp               installed but never configured - no task in the role
                    notifies the time-sync handlers, and 0 of the 107
                    PHTN-50-xxxxxx controls cover time sync
  libgcrypt         a workaround for aide declaring only an unversioned
                    Requires: libgcrypt; that belongs in aide.spec

The same three are dropped from examples/ova/packages_stig.json, so the OVA
package list and the installer's own list say the same thing. Keeping the two
in step matters: a list restated in two places is how the media and the
installer drifted apart in the first place.

Verified on four real STIG installs - two on photon-os-installer 2.8, two on
latest - whose manifests carry the reduced additional_packages list
[audit, rsyslog, openssl-fips-provider, selinux-policy, aide]:

  libselinux-utils              installed, transitively
  libgcrypt                     installed, transitively
  ntp / ntpsec                  absent, and time sync works via
                                systemd-timesyncd

aide's dependency is now a versioned Requires: libgcrypt >= 1.10.4, confirmed
in aide-0.19-3.ph5, so nothing rests on the unversioned form any more.

Signed-off-by: Daniel Casota <dcasota@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW73JTCUGRcaNTUEQcAMtf
@dcasota
dcasota force-pushed the upstream/stig-drop-redundant-packages branch from d3ac861 to 964162b Compare September 2, 2026 06:07
@dcasota

dcasota commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

The PR has been modified and tested with minimal ISO, kickstart, x86_64, without/with STIG, prebuilt canister. The ongoing tests with a full iso x86_64 should be fine, too. aarch64 hasn't been tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants